﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

using AjaxControlFramework;

namespace AjaxControlFramework.Docs.Examples
{
    public class AjaxExample : Example, IAjaxControl
    {
        //------// Properties \\--------------------------------------------\\
		public virtual AjaxControlContext AjaxContext { get; set; }

		public virtual bool IsUpdating { get; set; }

        public virtual StateStrategy StateStrategy { get; set; }
		public virtual CallbackStrategy CallbackStrategy { get; set; }
		//------\\ Properties //--------------------------------------------//



		//------// Constructors \\------------------------------------------\\
        public AjaxExample()
		{
            AjaxControl.Initialize(this);
		}
		//------\\ Constructors //------------------------------------------//



		//------// Methods \\-----------------------------------------------\\
		public void RaiseCallbackEvent(string eventArgs)
		{
			CallbackStrategy.ProcessCallback<CallbackStrategyArguments>(eventArgs);
		}


		public string GetCallbackResult()
		{
			return CallbackStrategy.GenerateCallbackResult();
		}
		//------\\ Methods //-----------------------------------------------//
    }
}
